package cn.joeg.springbootrabbitmq.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "FIRST_QUEUE")
public class FirstConsumer {

    @RabbitHandler
    public void process(String msg) {
        System.out.println("process: first queue received msg : " + msg);
    }


    @RabbitHandler
    public void process2(byte[] bytes) {
        System.out.println("process2: first queue received msg : " + new String(bytes));
    }


    @RabbitHandler
    public void process3(Integer msg) {
        System.out.println("process3: first queue received msg : " + msg);
    }
}
